<template>
  <div class="follow-container">
    <!-- 动态背景光效 -->
    <div class="neon-bg"></div>
    
    <!-- 标题装饰 -->
    <div class="title-decoration">
      <span class="neon-dot dot-1"></span>
      <span class="neon-dot dot-2"></span>
    </div>
    
    <h2 class="main-title">关注</h2>
    
    <!-- 分类标签 -->
    <div class="category-tabs">
      <div class="tab-item active">全部</div>
      <div class="tab-item">角色</div>
      <div class="tab-item">同人</div>
      <div class="tab-item">动态</div>
      <div class="tab-item">专栏</div>
      <div class="tab-item">博主</div>
    </div>
    
    <!-- 关注内容列表 -->
    <div class="follow-list">
      <!-- 示例关注项 - 角色 -->
      <div class="follow-card" v-for="(item, index) in followItems" :key="index">
        <div class="card-header">
          <img :src="item.avatar" alt="avatar" class="avatar">
          <div class="info">
            <h3 class="name">{{ item.name }}</h3>
            <p class="desc">{{ item.desc }}</p>
          </div>
          <button class="follow-btn">
            <i class="fa fa-heart-o"></i> 关注
          </button>
        </div>
        <div class="card-footer">
          <span class="post-count">{{ item.postCount }}篇内容</span>
          <span class="followers">{{ item.followers }}人关注</span>
        </div>
      </div>
    </div>
    
    <!-- 底部装饰 -->
    <div class="bottom-decoration">
      <div class="neon-line"></div>
    </div>
  </div>
</template>

<script setup>
// 模拟关注数据
const followItems = [
  {
    avatar: 'https://picsum.photos/200/200?random=10',
    name: '莴苣某人',
    desc: '原神up主',
    postCount: 56,
    followers: 24567
  },
  {
    avatar: 'https://picsum.photos/200/200?random=11',
    name: '你的影月月',
    desc: '原神主播',
    postCount: 32,
    followers: 18765
  },
  {
    avatar: 'https://picsum.photos/200/200?random=12',
    name: '覆雪之下',
    desc: 'up主 原神',
    postCount: 48,
    followers: 32145
  },
  {
    avatar: 'https://picsum.photos/200/200?random=13',
    name: '琉璃酱',
    desc: '虚拟YouTuber',
    postCount: 64,
    followers: 45321
  }
]
</script>

<style lang="scss" scoped>
/* 霓虹二次元色彩变量 */
:root {
  --neon-pink: #FF2D95;        /* 霓虹粉 */
  --neon-purple: #9D4EDD;      /* 霓虹紫 */
  --neon-blue: #4361EE;        /* 霓虹蓝 */
  --neon-green: #38B000;       /* 霓虹绿 */
  --bg-dark: #0A0A1A;          /* 深色背景 */
  --text-glow: rgba(255, 255, 255, 0.9);
}

.follow-container {
  min-height: 100vh;
  padding: 60px 20px 100px;
  position: relative;
  overflow: hidden;
  background-color: var(--bg-dark);
  
  /* 动态背景光效 */
  .neon-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
      radial-gradient(circle at 20% 30%, var(--neon-pink) 0%, transparent 30%),
      radial-gradient(circle at 80% 70%, var(--neon-blue) 0%, transparent 30%);
    background-size: 800px 800px;
    opacity: 0.15;
    animation: bgMove 60s linear infinite;
    z-index: 0;
  }
}

/* 标题样式 */
.main-title {
  position: relative;
  z-index: 2;
  color: var(--text-glow);
  font-family: 'Orbitron', 'Arial Rounded MT Bold', sans-serif;
  font-size: 2.8rem;
  text-align: center;
  margin-bottom: 1.5rem;
  letter-spacing: 3px;
  text-shadow: 
    0 0 5px var(--neon-pink),
    0 0 10px var(--neon-pink),
    0 0 20px var(--neon-pink);
    
  &::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--neon-pink), var(--neon-purple));
    margin: 15px auto;
    border-radius: 2px;
    box-shadow: 0 0 5px var(--neon-pink), 0 0 10px var(--neon-pink);
  }
}

/* 标题装饰元素 */
.title-decoration {
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  gap: 20px;
  
  .neon-dot {
    position: relative;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--neon-pink);
    box-shadow: 0 0 10px var(--neon-pink), 0 0 20px var(--neon-pink);
    animation: pulse 2s infinite alternate;
    
    &.dot-2 {
      background-color: var(--neon-blue);
      box-shadow: 0 0 10px var(--neon-blue), 0 0 20px var(--neon-blue);
      animation-delay: 0.5s;
    }
  }
}

/* 分类标签样式 */
.category-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 30px;
  position: relative;
  z-index: 2;
}

.tab-item {
  padding: 10px 24px;
  border-radius: 24px;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-glow);
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  
  &:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
  }
  
  &.active {
    background: linear-gradient(90deg, var(--neon-pink), var(--neon-purple));
    color: white;
    box-shadow: 0 0 15px var(--neon-pink), 0 0 25px var(--neon-pink);
    border: none;
  }
}

/* 关注内容列表样式 */
.follow-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
  position: relative;
  z-index: 2;
}

.follow-card {
  background: linear-gradient(145deg, rgba(10, 10, 26, 0.8), rgba(10, 10, 26, 0.5));
  border-radius: 16px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  
  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--neon-pink), var(--neon-purple), var(--neon-blue));
  }
  
  &::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
      radial-gradient(circle at top right, var(--neon-pink) 0%, transparent 70%),
      radial-gradient(circle at bottom left, var(--neon-blue) 0%, transparent 70%);
    background-size: 400px 400px;
    opacity: 0.05;
    z-index: 0;
  }
  
  &:hover {
    transform: translateY(-10px);
    box-shadow: 
      0 0 15px var(--neon-pink),
      0 0 30px var(--neon-purple),
      0 0 20px rgba(0, 0, 0, 0.3);
  }
}

.card-header {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  position: relative;
  z-index: 1;
}

.avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--neon-pink);
  box-shadow: 0 0 10px var(--neon-pink);
}

.info {
  margin-left: 15px;
  flex: 1;
}

.name {
  color: var(--text-glow);
  font-size: 1.15rem;
  font-weight: bold;
  margin-bottom: 5px;
  text-shadow: 0 0 5px var(--neon-pink);
}

.desc {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
}

.follow-btn {
  background: linear-gradient(90deg, var(--neon-pink), var(--neon-purple));
  color: white;
  border: none;
  border-radius: 20px;
  padding: 8px 18px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  box-shadow: 0 0 10px var(--neon-pink);
  
  &:hover {
    background: linear-gradient(90deg, #FF45A2, #B35AF2);
    transform: translateY(-2px);
    box-shadow: 0 0 15px var(--neon-pink), 0 0 25px var(--neon-pink);
  }
  
  i {
    margin-right: 5px;
  }
}

.card-footer {
  display: flex;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  z-index: 1;
}

.post-count, .followers {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  
  &::before {
    content: '•';
    margin-right: 5px;
    color: var(--neon-green);
    text-shadow: 0 0 5px var(--neon-green);
  }
}

/* 底部装饰 */
.bottom-decoration {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  z-index: 1;
  
  .neon-line {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 2px;
    background: linear-gradient(90deg, var(--neon-pink), var(--neon-purple), var(--neon-blue));
    box-shadow: 0 0 10px var(--neon-pink), 0 0 15px var(--neon-purple);
  }
}

/* 动画效果 */
@keyframes bgMove {
  0% { background-position: 0 0; }
  100% { background-position: 100px 100px; }
}

@keyframes pulse {
  0% { 
    transform: scale(1);
    box-shadow: 0 0 5px var(--neon-pink), 0 0 10px var(--neon-pink);
  }
  100% { 
    transform: scale(1.2);
    box-shadow: 0 0 10px var(--neon-pink), 0 0 20px var(--neon-pink), 0 0 30px var(--neon-pink);
  }
}

/* 移动端适配 */
@media (max-width: 768px) {
  .main-title {
    font-size: 2.2rem;
  }
  
  .category-tabs {
    gap: 10px;
  }
  
  .tab-item {
    padding: 8px 20px;
    font-size: 0.85rem;
  }
  
  .follow-list {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .follow-card {
    padding: 15px;
  }
}
</style>